﻿namespace Lyricsgrabber.Core.Tags.FLAC
{
  internal class VorbisComment : IMetadata
  {
    #region Public / Attributes

    public MetadataType Type { get; private set; }
    public string RawType { get; private set; }
    public string Value { get; set; }
    public string Language { get; set; }

    #endregion

    #region Public / Constructors

    public VorbisComment(string comment)
    {
      string[] split = comment.Split('=');

      Type = ConvertStringToTpye(split[0]);
      RawType = split[0];

      Value = split[1];
    }

    private MetadataType ConvertStringToTpye(string type)
    {
      switch (type)
      {
        default:
          return MetadataType.Unknown;
      }
    }

    #endregion

    public override string ToString()
    {
      return string.Format("{0}: {1}", Type, Value);
    }
  }
}